<template>
  <div class="list_box">
    <div
      v-for="item in list"
      :key="item.id"
      class="flex items-center justify-between rounded p-1 bg-gray-200 mb-1 mb-2"
    >
      <span> {{ item.name }}</span>
      <span class="text-gray-500">{{ item.isRequired ? '必填' : '' }} {{ item.type }}</span>
    </div>
  </div>
</template>

<script setup lang="ts">
  const props = defineProps<{
    list: any[]
  }>()
</script>

<style scoped lang="less">
  .list_box {
    width: 100%;
    height: 100%;
  }
</style>
